<script id="demo" type="text/javascript">
$(document).ready(function() {
	// validate signup form on keyup and submit
	 $("#UserAdminChangepasswordForm").validate({
             errorElement: 'span',
		rules: {
                        "data[User][old_passowrd]":{required:true},
                        "data[User][new_passowrd]":{required:true,minlength:6},
                        "data[User][confrim_password]":{required:true,equalTo:"#UserNewPassowrd",minlength:6},                       
			 terms: "required"
		},
		messages: {
                     
			terms: " "
		},errorPlacement: function(error, element) {
                           $(element).parent().addClass("error");
                           error.appendTo( element.parent());
		},
		// set this class to error-labels to indicate valid fields
		success: function(label) {                     
			  $(label).parent().removeClass("error");
		}

	});



});
</script>
<div class="users form">
<?php echo $form->create('User');?>
    <div class="fields">
     <h2><?php __('Chnage Passowrd');?></h2>
	<fieldset>
 		
                <p>
            <label for="name01" class="small">Old Password </label>
	<?php echo $form->input('old_passowrd',array('label'=>false,'div'=>false,"class"=>"sText")); ?></p>
                 <p>
            <label for="name01" class="small">New passowrd </label>
	<?php echo $form->input('new_passowrd',array('label'=>false,'div'=>false,"class"=>"sText",'type'=>'password')); ?></p>
                  
         <p>
            <label for="name01" class="small">Confirm P </label>
<?php echo $form->input('confrim_password', array('label' => false, 'div' => false,"class"=>"sText",'type'=>'password')); ?>
         </p>
        
	</fieldset>
    </div>
      <div class="fields">
            <h2></h2>
            <p class="tright">
                <?php echo $form->submit(__('Save',true),array("div"=>false,"class"=>"butDef"));?>                                
                <?php echo $this->Html->link(__('Cancel', true), array('action' => 'index'),array("class"=>"butSim"),false); ?>
                
            </p>
        </div>
    <?php
		echo $form->input('id'); ?>
<?php echo $form->end();?>
</div>
